﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Horridor
{
    class Weapon
    {
        private List<Bullet> bullets;

        public Weapon()
        {
            bullets = new List<Bullet>();
        }

        public void Update(int ems)
        {
            bullets.ForEach(b => b.Update(ems));
        }

        public void Draw(SpriteBatch batchy)
        {
            bullets.ForEach(b => b.Draw(batchy));
        }

        public void Shoot(Vector2 origin, Vector2 aim)
        {
            bullets.Add(new Bullet(origin, aim, Game1.playerTex));
        }
    }
}
